iT邦幫忙

2025 iThome 鐵人賽

DAY 21
0

如果說手臂是AI,那就不能不提Dataset了

UR3 CobotOps 資料集(UR3 CobotOps Dataset)

  • 包含 UR3 協作機器人的多變量時間序列資料。

  • 特徵包括電流、溫度、關節速度、夾持器電流、運轉週期數、保護性停止和夾持損失。

  • 數據透過 MODBUS 和 RTDE 協定收集。

  • 專為故障檢測、預測性維護和操作優化中的機器學習應用而設計。

  • 包含 7,409 個實例和 20 個特徵;部分值缺失。

  • 託管於 UCI 機器學習儲存庫,提供相關的聚類分析和記錄方法。

UR3 CobotOps 資料集是來自 UCI Machine Learning Repository 的開源資料集,專注於 UR3 協作機器人(cobot)的多維時間序列數據。它收集了機器人的運作參數和故障資訊,適合用於機器學習在機器人和自動化領域的研究,例如故障檢測、預測維護和運作優化。數據透過 MODBUS 和 RTDE 協議收集,涵蓋關節(J0-J5)的電流、溫度、速度、夾爪電流、運作循環計數、防護停止和夾持損失等。

資料集基本資訊

資料特性:多變量(Multivariate)、時間序列(Time-Series)。
實例數(Instances):7409。
屬性數(Attributes):20。
屬性類型:實數(Real)、類別(Categorical)、整數(Integer)。具體包括連續特徵如 Current_J0(電流 J0)、Temperature_J0(溫度 J0),以及類似 J1 到 J5 的其他關節參數,總共涵蓋電流、溫度、速度、夾爪電流等。
缺失值(Missing Values):有(Yes)。
相關任務(Associated Tasks):分類(Classification)、回歸(Regression)、聚類(Clustering)及其他(Other)。

其他細節

資料格式:提供 Excel 檔案,可下載 ZIP 檔(ur3+cobotops.zip)。
屬性詳細資訊:屬性包括 Current_J0 到 Current_J5(電流)、Temperature_J0 到 Temperature_J5(溫度)、速度等,大多為連續值,並有缺失值。總共 20 個特徵,提供機器人運作的詳細快照。

可在 UCI 網站直接下載,Kaggle 上也有鏡像版本可用於探索。

底下是取用的python code:

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

# Step 1: Load the dataset
# Assume the dataset is downloaded from UCI ML Repository as 'dataset_02052023.xlsx'
file_path = 'dataset_02052023.xlsx'  # Replace with your actual file path
df = pd.read_excel(file_path)

# Display the first few rows to understand the data
print("First 5 rows of the dataset:")
print(df.head())

# Step 2: Basic information and summary statistics
print("\nDataset Info:")
df.info()

print("\nSummary Statistics:")
print(df.describe())

# Step 3: Check for missing values
print("\nMissing Values per Column:")
print(df.isnull().sum())

# Handle missing values (example: fill with mean for numerical columns)
numerical_cols = df.select_dtypes(include=['float64', 'int64']).columns
df[numerical_cols] = df[numerical_cols].fillna(df[numerical_cols].mean())

# Step 4: Analyze specific attributes (e.g., currents and temperatures)
# Select current columns
current_cols = [col for col in df.columns if 'Current' in col]
print("\nSummary of Current Attributes:")
print(df[current_cols].describe())

# Select temperature columns
temp_cols = [col for col in df.columns if 'Temperature' in col]
print("\nSummary of Temperature Attributes:")
print(df[temp_cols].describe())

# Step 5: Visualization
# Histogram of a sample column (e.g., Current_J0)
plt.figure(figsize=(10, 6))
sns.histplot(df['Current_J0'], kde=True)
plt.title('Distribution of Current_J0')
plt.xlabel('Current_J0')
plt.ylabel('Frequency')
plt.show()

# Correlation heatmap for numerical features
plt.figure(figsize=(12, 8))
corr_matrix = df[numerical_cols].corr()
sns.heatmap(corr_matrix, annot=False, cmap='coolwarm')
plt.title('Correlation Heatmap of Numerical Features')
plt.show()

# Boxplot for temperatures
plt.figure(figsize=(12, 6))
sns.boxplot(data=df[temp_cols])
plt.title('Boxplot of Joint Temperatures')
plt.xlabel('Joints')
plt.ylabel('Temperature')
plt.xticks(rotation=45)
plt.show()

# Step 6: Advanced Analysis (example: Time-series plot assuming an index as time)
# If there's no explicit time column, use row index as proxy
df['Index'] = df.index  # Use row index as time proxy
plt.figure(figsize=(12, 6))
plt.plot(df['Index'], df['Current_J0'], label='Current_J0')
plt.plot(df['Index'], df['Temperature_J0'], label='Temperature_J0')
plt.title('Time-Series Plot of Current and Temperature for J0')
plt.xlabel('Sample Index (Proxy for Time)')
plt.ylabel('Value')
plt.legend()
plt.show()

# Optional: Save cleaned dataset
df.to_csv('cleaned_ur3_cobotops.csv', index=False)
print("\nCleaned dataset saved as 'cleaned_ur3_cobotops.csv'")

仔細想想,這麼詳細的數據是拿來做什麼呢?其實會用COBOT機械臂來協作的企業,一定不只買一支手臂,當幾百幾千支手臂一起運作時,能耗就是一個重要的課題,IEEE的DataPort也有提供類似的資料集,有興趣也可以自己上去下載。

Reference:UR3 CobotOps


上一篇
[Day20] 小結,來點SOP!
下一篇
[Day 22] Cobot Localization Dataset
系列文
機器人的時代來了(協作型手臂的開發與實作)26
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言